<template>
  <a-flex justify="flex-end" class="pagination">
    <a-pagination
      :current="pageNo"
      :page-size="pageSize"
      :total="total"
      :show-total="total => `共 ${total} 条数据`"
      :showSizeChanger="false"
      @change="onChange"
      show-quick-jumper
      v-if="total >0"
    />
  </a-flex>
</template>
<script lang="ts" setup>
const emit = defineEmits(["changePage"]);
const props = defineProps({
  pageNo: {
    type: Number
  },
  pageSize: {
    type: Number
  },
  total: {
    type: Number
  }
});

function onChange(pageNo) {
  emit("changePage", pageNo);
}
</script>
<style scoped>
.pagination {
}
</style>
